<div class="body-top">

	<div align="left">{$introduction nofilter}</div>
	
	<table class="coolness">
	
		<tr>
			<th><b>#</b></th>
			<th align="left"><b>Country</b></th>
			<th><b>Flag</b></th>
			<th><b>Season</b></th>
			<th><b>Active</b></th>
			{foreach from=$trainingtypes item=tt}
			<th title="{$tt->getDescription()}">{$tt->getAbbreviation()}</th>
			{/foreach}
		</tr>
		
	{foreach from=$trainingTable item=row name=trainingTable_loop}
		{assign var=country value=$row->getCountry()}
		{assign var=trainings value=$row->getTrainings()}
		<tr>
			<td align="right">{$row->getRank()}.</td>
			<td align="left">{$country->getName()}</td>
			<td align="center"><div class="flag" style="background-position: -{math equation='(x*y)' x=25 y=$country->getCountryID()}px 0px;" title="{$country->getName()}"></div></td>
			<td align="center">{$country->getSeasons()}</td>
			<td align="center">{$country->getActiveusers()|number_format:0:".":" "}</td>
			
			{foreach from=$trainings item=training name=trainings_loop}
			<td align="center" class="training" title="{$training->getTrainingType()->getDescription()}">
				{$training->getNumber()|number_format:0:".":" "}<br />({$training->getFraction()}%)
			</td>
			{/foreach}
		</tr>
	{/foreach}
	
	</table>

</div>